/**
 * 
 */

function DateTime(aDate) {
    this.date = new Date(aDate);
    alert(date);
}

function DateTime() {
	this.date = new Date();
}

DateTime.prototype.getFormattedDate = function() {
	var day = this.date.getDate();
	if (day<=9) {day="0"+day;}
	var month = this.date.getMonth();
	month=month+1;
	if (month<=9) {month="0"+month;}
	var year = this.date.getFullYear();
	if (year>=2000) {
		year=year-2000;
	} else {
		year=year-1900;
	}
	alert(day+"/"+month+"/"+year);
    return day+"/"+month+"/"+year;
};

DateTime.prototype.parse = function(strDate) {
	var day = strDate.charAt(0);
	day = day+strDate.charAt(1);
	day = Number(day);
	
	var month = strDate.charAt(3);
	month = month+strDate.charAt(4);
	month = Number(month);
	
	var year = strDate.charAt(6);
	year = year+strDate.charAt(7);
	year = Number(year);
	if (year>70) {
		year = 1900+year;
	} else {
		year = 2000+year;
	}
	
	this.date.setDate(day);
	this.date.setMonth(month-1);
	this.date.setFullYear(year);
	
	return this;
}
